import fetch from '@/utils/fetch'

export function GetTopNavs() {
  return fetch({
    url: '/permission/firstMenu',
    method: 'get'
  })
}

export function GetSideNavs(pid) {
  return fetch({
    url: '/permission/subMenu',
    method: 'get',
    params: { pid }
  })
}

// 查询查单名称
export function GetPersimmonName(inputName) {
  return fetch({
    url: '/permission/getByName',
    method: 'get',
    params: { inputName }
  })
}

//获取侧边栏map
export  function GetSideNavsMap(id) {
  return fetch({
    url: '/permission/getSideNavsMap',
    method: 'get',
    params: { id }
  })
}

//获取权限具有的路由
export  function GetOwnRouter(pid) {
  return fetch({
    url: '/permission/getOwnRouter',
    method: 'get',
    params: { pid }
  })
}
